<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
    $(function(){
        /*住院号*/
        $("#visitNo").keydown(function(e){
            var visitNo = $("#visitNo").val();
            if (e.keyCode == 13) {
                loadDiv('mainCenterDiv','${ctx}/blood/bloodTest/findByVisitNo?visitNo='+visitNo);
            }
        });
    });
</script>
<div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/blood/bloodTest/form')"> 验血表</a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-12">
                        <form:form id="inputForm" data-parsley-validate="" modelAttribute="bloodTest" onsubmit="return formSaveLoad('mainCenterDiv','inputForm','${ctx}/blood/bloodTest/save','${ctx}/blood/bloodTest/form');" method="post" class="form-horizontal">
                            <form:hidden path="id"/>
                            <form:hidden path="visitId"/>
                            <form:hidden path="clinicId"/>
                            <form:hidden path="patientId"/>
                            <form:hidden path="inoroutFlag" value="1"/>
                            <form:hidden path="wardCode" />
                            <div class="form-group">
                                <label class="col-sm-2 control-label">验血单号：</label>
                                <div class="col-sm-4">
                                    <form:input path="testNo" htmlEscape="false" class="form-control"  maxlength="64" readonly="true" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">住院号：</label>
                                <div class="col-sm-4">
                                    <form:input path="visitNo" id="visitNo" htmlEscape="false" class="form-control"  maxlength="64" />
                                </div>
                                <span class="help-inline">输入住院号，回车查询患者信息</span>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">患者姓名：</label>
                                <div class="col-sm-4">
                                    <form:input path="name" htmlEscape="false" class="form-control"  maxlength="64" readonly="true" data-parsley-required="true" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">性别：</label>
                                <div class="col-sm-4">
                                    <form:select path="sex" id="sex" class="form-control" data-parsley-required="true"  disabled="true">
                                        <form:options items="${fns:getDictList('SEX_DICT')}" itemLabel="label" itemValue="value"  htmlEscape="false"/>
                                    </form:select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否收取验血费：</label>
                                <div class="col-sm-4">
                                    <form:select path="testFeeFlag" id="testFeeFlag" class="form-control" data-parsley-required="true" >
                                        <form:options items="${fns:getDictList('YES_NO')}" itemLabel="label" itemValue="value"  htmlEscape="false"/>
                                    </form:select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">血型：</label>
                                <div class="col-sm-4">
                                    <form:select path="bloodGroup" id="bloodGroup"  class="form-control" data-parsley-required="true">
                                        <form:options items="${fns:getDictList('BLOOD_TYPE_DICT')}" itemLabel="label" itemValue="value" htmlEscape="false" data-parsley-required="true"/>
                                    </form:select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">科室：</label>
                                <div class="col-sm-4">
                                    <sys:treeselect id="orgDeptId" name="deptStayed.id" value="${bloodTest.deptStayed.id}" isnull="true"  update="${not empty bloodTest.deptStayed.id}" labelName="${bloodTest.deptStayed.deptName}" labelValue="${bloodTest.deptStayed.deptName}"
                                                    title="科室" url="/sys/orgDept/treeData"  cssClass="form-control"/>
                                </div>
                            </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">化验者：</label>
                                    <div class="col-sm-4">
                                        <select name="testUser" class="form-control">
                                            <c:forEach items="${users}" var="u">
                                                <option value="${u.id}" >${u.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">RH血　型：</label>
                                    <div class="col-sm-4">
                                        <form:select path="rh" id="rh"  class="form-control" data-parsley-required="true">
                                            <form:options items="${fns:getDictList('rh_dict')}" itemLabel="label" itemValue="value" htmlEscape="false" data-parsley-required="true"/>
                                        </form:select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">审验　者：</label>
                                    <div class="col-sm-4">
                                        <select name="assessor" class="form-control">
                                            <c:forEach items="${users}" var="u">
                                                <option value="${u.id}" >${u.name}</option>
                                            </c:forEach>
                                        </select>

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">卡式血型抗体筛查：</label>
                                    <div class="col-sm-4">
                                        <form:select path="bloodAntiboby" id="bloodAntiboby"  class="form-control" data-parsley-required="true">
                                            <form:options items="${fns:getDictList('rh_dict')}" itemLabel="label" itemValue="value" htmlEscape="false" data-parsley-required="true"/>
                                        </form:select>
                                    </div>
                                </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">预定输血时间：</label>
                                <div class="col-sm-4">
                                    <input name="rq" readonly class="form-control Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<fmt:formatDate value="${bloodTest.rq}" pattern="yyyy-MM-dd HH:mm:ss"/>" />
                                </div>
                            </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存">&nbsp;
                                       <%-- <input id="btnCancel" class="btn" type="reset" value="重 置" >--%>
                                </div>
                            </div>
                        </form:form>
                    </div>

                </div>
            </section>
        </div>
    </div>